Deploying Docker Engine on Linux
Before you can install and run Eggplant Generator in a Docker container on a linux system (or systems), you need to verify your system meets the following prerequisites and perform the following pre-deployment steps.
Software Recommendations for Eggplant Generator with Docker on Linux Systems
See the Prerequisites page for information about the required hardware and memory for Eggplant Generator.
| Software | Version |
|---|---|
| Ubuntu LTS Linux (64-bit) | 22/24 |
| Docker Engine | Engine up-to-date. See the Install Docker Engine guide for information about installing Docker Engine. |
| Docker Compose | Compose 2.23.0 or higher |
| NVIDIA CUDA Driver | 12.x / up-to-date. See the CUDA Installation Guide for Linux guide for information about installing the CUDA driver. |
| NVIDIA Container Toolkit | 1.17.3. See Installing the NVIDIA Container Toolkit — NVIDIA Container Toolkit for more information. |
| Eggplant IAM (Keycloak) | See install Eggplant IAM (Keycloak). |
Installation and Pre-Deployment Checklist
The examples below uses Ubuntu 24.04.1 as a reference. For other operating systems, the process is basically the same with subtle differences. Refer to the official documentation link above.
Install the Docker Engine
Install the Docker Engine on the linux system where you plan to run the Docker container that will host Eggplant Generator.
-
Download the required software. Refer to the Software Requirements table above for the list of what you need.
-
In a terminal, install Docker Engine using the following script. For more information, see Install Docker Engine in the Docker documentation.
# Add Docker's official GPG key:sudo apt-get -y updatesudo apt-get -y install ca-certificates curlsudo install -m 0755 -d /etc/apt/keyringssudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.ascsudo chmod a+r /etc/apt/keyrings/docker.asc# Add the repository to Apt sources:echo \"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullsudo apt-get updatesudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginsudo usermod -aG docker ubuntunewgrp docker -
Verify the Docker Engine installation by running the following command:
docker run --rm hello-world -
Compare the expected output below with the output on your system. The output below (from the command in the previous step) shows a successful Docker Engine installation and configuration.
Hello from Docker!This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(arm64v8)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/tipIf you do not have access to a GPU skip the rest of this section and continue to Deploying Eggplant Generator with Docker to install and deploy Eggplant Generator.
Install the NVIDIA CUDA Driver
Install the NVIDIA CUDA driver on the machine where you plan to run the Docker container that will host Eggplant Generator.
-
If you have not already done so, download the required software. Refer to the Software Recommendations table above for the list of what you need.
-
Check that the GPU devices exist.
a. Install the tooling by running the following commands. Refer to the official CUDA driver install documentation for more information.
sudo apt install -y ubuntu-drivers-commonsudo ubuntu-drivers devicesb. Compare the expected output below with the output on your system. The output below (from the command in the previous step) confirms the GPU devices exist.
== /sys/devices/pci0000:00/0000:00:1e.0 ==modalias : pci:v000010DEd00001EB8sv000010DEsd000012A2bc03sc02i00vendor : NVIDIA Corporationmodel : TU104GL [Tesla T4]driver : nvidia-driver-470-server - distro non-freedriver : nvidia-driver-535 - distro non-free recommendeddriver : nvidia-driver-470 - distro non-freedriver : nvidia-driver-535-server - distro non-freedriver : xserver-xorg-video-nouveau - distro free builtin -
Install the NVIDIA CUDA driver.
a. Run the following command to install the driver:
sudo ubuntu-drivers autoinstallsudo reboot # to take effectb. Run the follwing command to verify the driver installed successfully on the system.
nvidia-smic. Compare the expected output below with the output on your system. The output below (from the command in the previous step) confirms the NVIDIA CUDA driver installed successfully.
$ nvidia-smi+---------------------------------------------------------------------------------------+| NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2 ||-----------------------------------------+----------------------+----------------------+| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC || Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. || | | MIG M. ||=========================================+======================+======================|| 0 Tesla T4 Off | 00000000:00:1E.0 Off | 0 || N/A 24C P8 11W / 70W | 2MiB / 15360MiB | 0% Default || | | N/A |+-----------------------------------------+----------------------+----------------------++---------------------------------------------------------------------------------------+| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=======================================================================================|| No running processes found |+---------------------------------------------------------------------------------------+
Install the NVIDIA Container Toolkit
Install the NVIDIA Container Toolkit on the machine where you plan to run the Docker container that will host Eggplant Generator.
-
Install the toolkit. Refer to the official NVIDIA Container Toolkit installation documentation for more information.
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.listsudo apt-get updatesudo apt-get install -y nvidia-container-toolkit -
Configure the Docker Engine to work with the toolkit by running the following command. Refer to the official Docker Engine configuration documentation for more information.
sudo nvidia-ctk runtime configure --runtime=dockersudo systemctl restart docker -
Verify the GPU is working.
a. Run the following command to verify the GPU is working on the container:
docker run --rm --gpus all nvidia/cuda:12.6.3-base-ubuntu20.04 nvidia-smib. Compare the expected output below with the output on your system. The output below (from the command in the previous step) confirms the GPU is working in the Docker container.
+---------------------------------------------------------------------------------------+| NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.6 ||-----------------------------------------+----------------------+----------------------+| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC || Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. || | | MIG M. ||=========================================+======================+======================|| 0 Tesla T4 Off | 00000000:00:1E.0 Off | 0 || N/A 24C P8 11W / 70W | 2MiB / 15360MiB | 0% Default || | | N/A |+-----------------------------------------+----------------------+----------------------++---------------------------------------------------------------------------------------+| Processes: || GPU GI CI PID Type Process name GPU Memory || ID ID Usage ||=======================================================================================|| No running processes found |+---------------------------------------------------------------------------------------+
Next Step: Deploying Eggplant Generator with Docker
After you install and verify your Docker Engine and NVIDIA GPU CUDA configuration, and complete the pre-deployment checklist, continue to Deploying Eggplant Generator with Docker to install and deploy Eggplant Generator.